Skip to content

Fix DQN w RNN tutorial #3462

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: RC-TEST-2.8
Choose a base branch
from
Open

Conversation

svekars
Copy link
Contributor

@svekars svekars commented Jul 14, 2025

@svekars svekars added the 2.8 label Jul 14, 2025
Copy link

pytorch-bot bot commented Jul 14, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/3462

Note: Links to docs will display an error until the docs builds have been completed.

❌ 2 New Failures

As of commit f4d1b1c with merge base 9a44439 (image):

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the cla signed label Jul 14, 2025
@svekars svekars changed the base branch from main to RC-TEST-2.8 July 14, 2025 21:10
@svekars svekars marked this pull request as ready for review July 14, 2025 21:20
@svekars
Copy link
Contributor Author

svekars commented Jul 14, 2025

@vmoens ^^

sekyondaMeta added a commit that referenced this pull request Jul 16, 2025
Resetting changes in favor of: #3462
Copy link
Contributor

@vmoens vmoens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The decorator should be used when the policy is executed in the collector, not during instantiation of the policy object

policy = Seq(feature, lstm.set_recurrent_mode(True), mlp, qval)
from torchrl.modules import set_recurrent_mode

with set_recurrent_mode(True):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to be set during the loss computation.

The policy module given to the collector and to the loss will be the same. The decorator is to be set to True whenever a recurrent call is required (typically within the loss).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check the update, @vmoens ?

@svekars
Copy link
Contributor Author

svekars commented Jul 17, 2025

The decorator should be used when the policy is executed in the collector, not during instantiation of the policy object

Thanks, @vmoens. I just attempted that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants